import request from "@/utils/request";
import {BaseResponse} from "@/api/types/baseResponse";
import SystemDateResponse from "@/api/types/systemDate/SystemDateResponse";

// 通过年月查询系统日历
export async function getSystemDatesByMonth(month: string) {
    return await request<BaseResponse<SystemDateResponse[]>, BaseResponse<SystemDateResponse[]>>({
        url: "/system/systemdate",
        params: {month}
    })
}

// 修改系统日历
export async function updateSystemDate(systemDate: SystemDateRequest) {
    return await request<BaseResponse<undefined>, BaseResponse<undefined>>({
        url: "/system/systemdate",
        method: "PUT",
        data: systemDate
    })
}
